package com.zjl.spring.controller;

import com.zjl.spring.common.Response;
import com.zjl.spring.service.DBService;
import com.zjl.spring.service.ParamService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Auther: zhuangjl
 * @Date: 2021/11/11 16:21
 */
@RestController
@RequestMapping("/ex")
public class ExceptionController {

    @Autowired
    private DBService dbService;

    @Autowired
    private ParamService paramService;

    @GetMapping("/db")
    public Response db() {

        return dbService.execute();
    }

    @GetMapping("/param")
    public Response param() {

        return paramService.execute();
    }

}
